import Vue from 'vue'
import App from './App.vue'
import VueRouter from "vue-router"
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';
import store from './vuex/store'




import login from "./components/login.vue"
import teacher from "./components/teacher.vue"
import student from "./components/student.vue"

import teacher_m from "./components/teacher_m.vue"
import collection from "./components/collection.vue"
import teacherCheck from "./components/teacherCheck.vue"
import teacherEdit from "./components/teacherEdit.vue"
import studentCheck from "./components/studentCheck.vue"
import studentEdit from "./components/studentEdit.vue"
import top from "./components/top.vue"
import situation from "./components/situation.vue"
import publish from "./components/publish.vue"
import upload from "./components/upload.vue"
import ResetPw from "./components/ResetPw.vue"



//开启debug模式
Vue.config.debug = true;
Vue.use(ElementUI);
Vue.use(VueRouter);



// 创建一个路由器实例并且配置路由规则
const router = new VueRouter({
  mode: 'history',
  base: __dirname,
  routes: [
        { path: '/', components:  {
            default: login,
            },
        },
        { path: '/teacher', components:{
            default: teacher,
            top: top,
        },

        },
        { path: '/student', components:{
            default: student,
            top: top,
        },

        },
        { path: '/teacher_m', components:{
            default: teacher_m,
            top: top,
        },

        },
        { path: '/collection', components:{
            default: collection,
            top: top,
        },

        },
        { path: '/teacherCheck', components:{
            default: teacherCheck,
            top: top,
        },

        },
        { path: '/teacherEdit', components:{
            default: teacherEdit,
            top: top,
        },

        },
        { path: '/studentCheck', components:{
            default: studentCheck,
            top: top,
        },

        },
        { path: '/studentEdit', components:{
            default: studentEdit,
            top: top,
        },

        },
        { path: '/situation', components:{
            default: situation,
            top: top,
        },
        },
        { path: '/publish', components:{
            default: publish,
            top: top,
        },
        },
      { path: '/upload', components:{
          default: upload,
      },
      },
      { path: '/ResetPw', components:{
          default:ResetPw,
      },
      }



  ]
})

const app = new Vue({
      router: router,
      store,
      render: h => h(App)
}).$mount('#app')
